<?php
/*************************************************************
*
*	@file:	include/class/comment.class.php
*
*	@class:	purchase
*
*	@brief:	class that provide a whole support 
*				for comment.
*
*	@author: Skype
*************************************************************/

class comment
{
	/**
	*	@brief:	the error message
	*
	*	@access: public
	*
	*	@type: string
	*/
	public $error = '';

	/**
	*	@brief:	target user/seller/item id
	*
	*	@access: public
	*
	*	@type: string
	*/
	public $user = '';
	public $seller = '';
	public $item = '';
	
	/**
	*	@brief:	set the error message
	*
	*	@access: protected
	*
	*	@params: $error, string contain the message of error.
	*
	*	@return: none
	*/
	protected function setErrorMessage($error)
	{
		$this->error = $error;
	}

	/**
	 * 	@class constructor
	 */
	function __construct($user, $seller, $item)
	{
		if((!$seller && !$item) || !$user) return FALSE;
		if(!$seller)
			$this->item = $item;
		else
			$this->seller = $seller;
	}
	
	/**
	*	@brief:	add an purchase
	*
	*	@access: public
	*
	*	@params: $purchaseInfo
	*
	*	@return: commentID
	*/
	public function addComment($purchaseInfo)
	{
	}
	
	/**
	*	@brief:	remove an purchase
	*
	*	@access: public
	*
	*	@params: $purchaseInfo
	*
	*	@return: boolean
	*/
	public function delComment($purchaseID)
	{
	}
}
	